<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="../js/layui/css/layui.css"/>
    <script src="../js/layui/layui.js"></script>
</head>
<body class="layui-layout-body">
<div class="layui-fluid">
    <div class="layui-form">
        <div class="layui-form-item">
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-block">
                <input class="layui-input" type="text" placeholder="" autocomplete="off"
                       th:value="${userinfo_role?.userName}" name="userName"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-block">
                <input class="layui-input" type="text" placeholder="" autocomplete="off"
                       name="userInfo.userAccount" th:value="${userinfo_role?.userAccount}"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-block">
                <input class="layui-input" type="text" placeholder="@qq.com" autocomplete="off"
                       name="userInfo.email" th:value="${userinfo_role?.email}"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号</label>
            <div class="layui-input-block">
                <input class="layui-input" type="text" placeholder="@qq.com" autocomplete="off"
                       name="userInfo.mobileNumber" th:value="${userinfo_role?.mobileNumber}"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">固话</label>
            <div class="layui-input-block">
                <input class="layui-input" type="text" placeholder="@qq.com" autocomplete="off"
                       name="userInfo.telephoneNumber" th:value="${userinfo_role?.telephoneNumber}"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">角色</label>
            <!--<div class="layui-input-block" th:each="role,rolestate: ${userinfo?.roleVoList}">-->
                <!--<input type="checkbox" th:name="${role.roleName}" th:title="${role.roleName}">-->
            <!--</div>-->
            <div class="layui-input-block" th:each="role,rolestate: ${userinfo_role?.roleVoList}">
                <input type="checkbox"  th:checked="${role.Contains}" th:name="${role.roleName}" th:title="${role.roleName}">
            </div>
            <div class="layui-input-block" th:each="role,rolestate: ${roles}">
                <input type="checkbox" th:name="${role.roleName}" th:title="${role.roleName}">
            </div>

        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button id="save" class="layui-btn ayui-btn-primary">立即提交</button>
                <button id="close" class="layui-btn l">关闭</button>
            </div>
        </div>
    </div>
</div>

<script>
    layui.use(['element', 'form'], function () {
        var form = layui.form, $ = layui.jquery;
        $('#close').on('click', function () {
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        });
        $('#save').on('click', function () {
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
            // var index = parent.layer.getFrameIndex(window.name);
            // parent.layer.close(index);
        });

    });
</script>
</body>
</html>
